package top.juntower.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.juntower.dao.FoodMatchingMapper;
import top.juntower.pojo.FoodMatching;
import top.juntower.pojo.dto.FoodMatchingDto;
import top.juntower.pojo.vo.FoodMatchingVo;
import top.juntower.service.FoodMatchingService;

import java.util.List;
import java.util.Map;

@Service
public class FoodMatchingServiceImpl implements FoodMatchingService {
    @Autowired
    private FoodMatchingMapper foodMatchingMapper;


    @Override
    public List<FoodMatchingVo> queryFoodMatching(Integer pageNum, Integer pageSize) {
        return foodMatchingMapper.queryFoodMatching(pageNum,pageSize);
    }

    @Override
    public List<FoodMatching> queryFoodMatchinginformation(Integer fmId) {
        return foodMatchingMapper.queryFoodMatchinginformation(fmId);
    }

    @Override
    public int addFoodMatchingVisits(Integer fmId) {
        return foodMatchingMapper.addFoodMatchingVisits(fmId);
    }

    @Override
    public FoodMatchingDto querylastPage(Integer fmId) {
        return foodMatchingMapper.querylastPage(fmId);
    }

    @Override
    public FoodMatchingDto queryNextPage(Integer fmId) {
        return foodMatchingMapper.queryNextPage(fmId);
    }

    @Override
    public List<FoodMatching> queryFoodMatchingBackstage(Integer pageNum, Integer pageSize) {
        return foodMatchingMapper.queryFoodMatchingBackstage(pageNum, pageSize);
    }

    @Override
    public int deleteFoodMatchingById(Integer fmId) {
        return foodMatchingMapper.deleteFoodMatchingById(fmId);
    }

    @Override
    public int deleteMoreFoodMatching(List<Integer> list) {
        return foodMatchingMapper.deleteMoreFoodMatching(list);
    }

    @Override
    public int addFoodMatching(Map map) {
        return foodMatchingMapper.addFoodMatching(map);
    }

}
